package com.woniuxy.ui;

import com.woniuxy.entity.User;
import com.woniuxy.service.UserService;
import com.woniuxy.service.impl.UserServiceImpl;

import java.util.Scanner;

public class Application {
    public static void main(String[] args) {

    }

    private static void regist() {
    }

    private static void login() {
        Scanner sc = new Scanner(System.in);
        System.out.println("输入用户名");
        String uname = sc.next();
        System.out.println("输入密码");
        String password = sc.next();
        UserService userService=new UserServiceImpl();
        try {
            User user = userService.login(uname, password);
            System.out.println("登录成功，欢迎:"+user);
        } catch (Exception e) {
            System.out.println("登录失败:"+e.getMessage());
        }
    }
}
